'use strict'

class addWear {
    constructor () {
        this.param = '/:id'
    }

    async post (c) {
        let f = JSON.parse(c.body);
        let ret=await c.service.psql.query(`insert into wear(wear_id,wear_name,wear_text) values($1,$2,$3)`,
                                             [f.wear_id,f.wear_name,f.wear_text]);
        c.send(ret.rows);
    }
}

module.exports = addWear;
